package demo.hms.ReserveRecords.contoller;

import demo.hms.ReserveRecords.service.ReserveRecordsService;
import demo.hms.mybatis.entity.ReserveRecords;
import demo.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/reserveRecords")
public class ReserveRecordsController {

    @Resource
    private ReserveRecordsService service;

    @RequestMapping(value = "/queryAll", method = RequestMethod.GET)
    public Result queryAll(ReserveRecords reserveRecords){
        return service.queryAll(reserveRecords);
    }
    @RequestMapping(value = "/insert", method = RequestMethod.GET)
    public int insert(ReserveRecords reserveRecords){
        return service.insert(reserveRecords);
    }
}
